<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" >
</head>
<body>

<script>
const socket=new WebSocket("ws://127.0.0.1:8910");
socket.addEventListener('open',function(event){
    var bt_message={
      'type':'bt',
      'stuff_no':'u123',
      'user_type':2,
      'id':1001,
    };
    var login_message={
      'type':'login',
      'user_type':2,
      'stuff_no':'u123',
      'id':'u123',
    };
    socket.send(JSON.stringify(login_message));
});

socket.addEventListener('message',function(event){
    alert(event.data);
})
</script>
</body>
</html>
